package com.tourlaid.mamagerment.mapper

import com.tourlaid.mamagerment.entity.StockIn
import org.apache.ibatis.annotations.Param

/**
 * Created by xiaoyongge on 2017/7/19.
 */

interface StockInMapper {

    fun getById(id: Long): StockIn?;

    fun insert(record: StockIn);

    fun queryForList(): List<StockIn>?

    fun update(newStockIn: StockIn)

    fun getByControlNo(@Param("controlNo") controlNo: String): StockIn?

    fun delete(@Param("id") id: Long?, @Param("editor") editor: Long?)

    fun queryByGoodsIds(@Param("goodsIdList") goodsIdList: List<Long?>): List<StockIn>

    fun minusStock(@Param("id") id: Long?, @Param("stock") stock: Int?)

    fun queryByGoodsId(@Param("goodsId") goodsId: Long): List<StockIn>

    fun addStock(@Param("id") id: Long?, @Param("stock") stock: Int?)

}